/* Add these styles at the beginning of the file */
:root {
    --primary-color: #6B7FD7;
    --background-color: #0a0a0a;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --hover-color: rgba(255, 255, 255, 0.1);
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(20, 20, 20, 0.95);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.logo-image {
    height: 35px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--hover-color);
}

.nav-link.active {
    background: var(--primary-color);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .nav-link span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .logo {
        padding: 0;
        display: flex;
        justify-content: center;
    }
}

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* Update header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(10, 10, 10, 0.8);
    padding: 1rem 0;
}

.header-left h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
}

.admin-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
}

.nav-icon {
    color: var(--text-color);
    font-size: 1.2rem;
}

.orders-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-container {
    margin-bottom: 1.5rem;
}

.status-filter {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    cursor: pointer;
}

.orders-table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.orders-table th,
.orders-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-table th {
    font-weight: 600;
    background: rgba(107, 127, 215, 0.1);
}

.orders-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

.status-pending {
    background: #ffd700;
    color: #000;
}

.status-processing {
    background: #1e90ff;
    color: #fff;
}

.status-shipped {
    background: #9932cc;
    color: #fff;
}

.status-delivered {
    background: #32cd32;
    color: #fff;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    margin: 0 0.25rem;
    font-size: 1rem;
}

.view-btn {
    color: var(--primary-color);
}

.edit-btn {
    color: #4CAF50;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.customer-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
}

.customer-info h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.customer-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.customer-info i {
    color: var(--primary-color);
    width: 20px;
}

/* Update items list container */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Add scrollbar styling for items list */
.items-list::-webkit-scrollbar {
    width: 6px;
}

.items-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.items-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Update item card styles */
.item-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    max-width: 100%;
}

.item-image {
    width: 100px;
    min-width: 100px;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    padding: 1rem;
    flex-grow: 1;
}

.item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.item-quantity {
    font-size: 0.9rem;
    color: #888;
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

#modalOrderTotal {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .orders-content {
        padding: 0 1rem;
    }
}

.payment-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.price-breakdown p {
    display: flex;
    justify-content: space-between;
}

.price-breakdown .total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

.cod-badge {
    background: #e67e22;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Add these styles */
.status-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.status-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.status-btn i {
    font-size: 1rem;
}

.status-btn:hover {
    background: var(--primary-color);
}

.status-btn.active {
    background: var(--primary-color);
}

/* Status-specific colors */
.status-btn[data-status="pending"]:hover,
.status-btn[data-status="pending"].active {
    background: #ff9800;
}

.status-btn[data-status="processing"]:hover,
.status-btn[data-status="processing"].active {
    background: #2196F3;
}

.status-btn[data-status="shipped"]:hover,
.status-btn[data-status="shipped"].active {
    background: #9c27b0;
}

.status-btn[data-status="delivered"]:hover,
.status-btn[data-status="delivered"].active {
    background: #4CAF50;
}

.status-btn[data-status="cancelled"]:hover,
.status-btn[data-status="cancelled"].active {
    background: #f44336;
}

@media (max-width: 768px) {
    .status-filters {
        justify-content: center;
    }
    
    .status-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

.no-orders {
    padding: 2rem;
    text-align: center;
    color: #888;
}

.no-orders i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.no-orders p {
    font-size: 1.1rem;
}

/* Add these styles for edit functionality */
.edit-status-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    transition: color 0.3s ease;
}

.edit-status-btn:hover {
    color: #fff;
}

.status-select {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 0.25rem;
    margin-right: 0.5rem;
    font-family: inherit;
}

.status-select option {
    background: #1a1a1a;
}

.save-status-btn {
    background: var(--primary-color);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.save-status-btn:hover {
    background: #5468c4;
}

/* Update modal status display */
#modalOrderStatus {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* Add these styles */
.orders-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.total-orders {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.total-orders i {
    font-size: 2rem;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
}

.summary-details {
    display: flex;
    flex-direction: column;
}

.summary-details h3 {
    margin: 0;
    font-size: 1rem;
    color: #888;
}

#totalOrderCount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.order-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
}

.order-date i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

#currentDate {
    font-size: 1rem;
    color: #fff;
}

.date-filter {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.date-filter label {
    color: var(--text-color);
    font-size: 1rem;
}

.date-filter input[type="date"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 0.5rem;
    color: var(--text-color);
    font-family: inherit;
    cursor: pointer;
}

/* Adjust spacing for the following elements */
.orders-summary {
    margin-top: 1rem;
}

/* Add responsive styles */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .nav-link span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .logo {
        padding: 0;
        display: flex;
        justify-content: center;
    }
}

/* Add these styles */
.search-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Add margin to create space between stats and search */
.order-stats {
    margin-bottom: 1rem;
}

#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-family: inherit;
}

/* Add loading animation styles */
.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add styles for the new tag */
.new-tag {
    background: #ff9800;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

/* Order Stats Cards */
.order-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 1rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.stat-info span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

/* Status-specific colors */
.stat-card.pending .stat-icon {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.stat-card.processing .stat-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.stat-card.shipped .stat-icon {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
}

.stat-card.delivered .stat-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.stat-card.cancelled .stat-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* Status-specific colors */
.stat-card.total .stat-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Analytics and Returns stat cards */
.stat-card.analytics .stat-icon {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    animation: pulse 2s infinite;
}

.stat-card.returns .stat-icon {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    animation: pulse 2s infinite;
}

/* Enhance stat card hover effects */
.stat-card.analytics:hover,
.stat-card.returns:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Month Selector Styles */
.month-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    justify-content: center;
}

.month-dropdown,
.year-dropdown {
    position: relative;
    min-width: 200px;
}

.month-dropdown i,
.year-dropdown i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    pointer-events: none;
}

.month-dropdown select,
.year-dropdown select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
}

.month-dropdown select:hover,
.year-dropdown select:hover {
    background: rgba(255, 255, 255, 0.15);
}

.month-dropdown select:focus,
.year-dropdown select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 127, 215, 0.3);
}

/* Enhanced Month Selector Styles */
.month-dropdown,
.year-dropdown {
    position: relative;
    min-width: 200px;
}

.month-dropdown select,
.year-dropdown select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    appearance: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* Custom styling for select options */
.month-dropdown select option,
.year-dropdown select option {
    background: #1a1a1a;
    color: var(--text-color);
    padding: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Styling for the select element when opened */
.month-dropdown select:focus,
.year-dropdown select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 127, 215, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

/* Custom dropdown arrow */
.month-dropdown::after,
.year-dropdown::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* Rotate arrow when select is focused */
.month-dropdown:focus-within::after,
.year-dropdown:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Custom select overlay */
.select-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.month-dropdown:focus-within .select-overlay,
.year-dropdown:focus-within .select-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover effect for select options */
.month-dropdown select option:hover,
.year-dropdown select option:hover {
    background: var(--primary-color);
}

/* Active/selected state for options */
.month-dropdown select option:checked,
.year-dropdown select option:checked {
    background: var(--primary-color);
    color: white;
}

/* Remove default select arrow in Chrome */
.month-dropdown select::-webkit-scrollbar,
.year-dropdown select::-webkit-scrollbar {
    width: 8px;
}

.month-dropdown select::-webkit-scrollbar-track,
.year-dropdown select::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.month-dropdown select::-webkit-scrollbar-thumb,
.year-dropdown select::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Remove default select styling in Firefox */
.month-dropdown select,
.year-dropdown select {
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
}

/* Custom select wrapper for better control */
.select-wrapper {
    position: relative;
    width: 100%;
}

/* Glowing effect on hover */
.month-dropdown select:hover,
.year-dropdown select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(107, 127, 215, 0.2);
}

/* Animation for options */
@keyframes selectFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation to options */
.month-dropdown select option,
.year-dropdown select option {
    animation: selectFadeIn 0.2s ease;
}

@media (max-width: 768px) {
    .month-selector {
        flex-direction: column;
    }
    
    .month-dropdown,
    .year-dropdown {
        width: 100%;
    }
}

/* Month Selector Toggle Styles */
.month-selector-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 1rem;
    user-select: none;
    transition: background-color 0.3s ease;
}

.month-selector-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.month-selector-toggle .checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.month-selector-toggle .checkbox.checked {
    background-color: var(--primary-color);
}

.month-selector-toggle .checkbox.checked::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

.month-selector.hidden {
    display: none;
}

/* Add to your existing styles */
.date-filter.hidden {
    display: none;
}